#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <limits.h>
#include <dirent.h>
#include <sys/time.h>

#include "data_type.h"
#include "cube.h"
#include "cube_define.h"
#include "cube_record.h"

#include "tpm2_value.h"
#include "tpm2_base_structs.h"
#include "tpm2_structure.h"


#include "tpm2_global.h"
//#include "tcm_error.h"
//#include "vtcm_struct.h"


int tpm2_init(void * main_proc,void * init_para)
{
	PCR    * s_pcrs;
/*
	s_pcrs=Dalloc0(sizeof(PCR) *IMPLEMENTATION_PCR,NULL);
	if(s_pcrs==NULL)
		return -ENOMEM;
*/
    TPM2_CUBE_GLOBAL * global_tpm2_data = Dalloc0(sizeof(*global_tpm2_data),NULL);
    if(global_tpm2_data == NULL)
        return -ENOMEM;
    
	proc_share_data_setpointer(global_tpm2_data);

  	return 0;
}
